<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>定时器设置</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <%@include file="../../common/Include_input_head.jsp" %>
    <script type="text/javascript" src="${basePath }/component/datepicker/WdatePicker.js"></script>
</head>

<body style="text-align:center;">

<s:form name="theform" method="post" theme="simple">
    <s:hidden name="timer.wid" id="wid"/>

    <div class="box1" panelWidth="100%">
        <fieldset>
            <legend>定时器设置</legend>
            <table class="tableStyle" transMode="true" footer="normal">
                <tr>
                    <td align="right" width="25%" nowrap="nowrap">定时器名称：</td>
                    <td width="75%" align="left">
                        <s:textfield name="timer.timername" id="timername" cssStyle="width: 500px;"/>
                        <label style="color:red">*</label></td>
                </tr>
                <tr>
                    <td align="right">定时器类别：</td>
                    <td align="left">
                        <s:select name="timer.timercode" list="getSysCode('timer_code')" headerKey="" headerValue="-----请选择-----"
                                listKey="id" listValue="caption" cssStyle="width: 500px;"></s:select>
                        <label style="color:red">*</label></td>
                </tr>
                <tr>
                    <td align="right">开始时间：</td>
                    <td align="left">
                        <input name="timer.starttime" id="starttime" style="width: 500px;"
                               onclick="WdatePicker({startDate:'%y-%M-%d %h:%m:%s',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})"
                               value="<s:date name="timer.starttime" format="yyyy-MM-dd HH:mm:ss"/>"/>
                        <label style="color:red">*</label></td>
                </tr>
                <tr>
                    <td align="right">间隔时间数：</td>
                    <td align="left">
                        <s:textfield name="timer.interval" id="interval" cssStyle="width: 370px;" onkeypress="NumberText(event)" maxlength="3"/>
                        <s:select name="timer.intervaltype" list="getSysCode('timer_jgsj')"
                                  headerKey="" headerValue="-----请选择-----" listKey="id" listValue="caption" cssStyle="width: 500px;"></s:select>
                        <label style="color:red">*</label></td>
                </tr>
                <tr>
                    <td align="right">状态：</td>
                    <td align="left">
                        <s:radio name="timer.state" list="#{'1':'启用','0':'禁用'}"
                                 value="%{timer==null?'1':timer.state}"/>
                        <label style="color:red">*</label></td>
                </tr>
            </table>
        </fieldset>

        <div class="padding_top10">
            <table class="tableStyle" transMode="true">
                <tr>
                    <td colspan="4">
                        <input type="button" id="ysSaveButton" value=" 保 存 " onclick="doSave()"/>
                        <input type="button" value=" 关 闭 " onclick="parent.closeEntityWindow()"/>
                        <s:if test="actionErrors.size()>0 || actionMessages.size()>0 || fieldErrors.size()>0">
						<span id="SystemErrorMessage" style="top: 20px">
							<s:actionerror cssStyle="color:red"/>
							<s:actionmessage cssStyle="color:blue"/>
							<s:fielderror/>
						</span>
                        </s:if>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</s:form>
</body>
</html>
